/*****************************************************************************
 * $LastChangedDate: 2013-05-26 14:26:47 -0400 (Sun, 26 May 2013) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   A part of the C++ core that calls Lua functions.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef GLUE_CORE2LUA_HH
#define GLUE_CORE2LUA_HH 1

#include "base/singleton.hh"
using namespace base;
#include "object/module.hh"
#include "object/events.hh"
using namespace object;
#include "collision/module.hh"
#include "collision/events.hh"
using namespace collision;

namespace glue {

////////////////////////////////////////////////////////////////////////////////
/// @brief Glue code between C++ core and Lua.
///
/// The purpose of this class is to centralize where C++ core calls Lua.
///
class Core2Lua
{
PREVENT_COPYING(Core2Lua)
public:
    DEFINE_GetInstance( Core2Lua )  // Singleton

private:
    Core2Lua( void );
    ~Core2Lua();

private:
    CLASS_DESTROY_OBJECT_LISTENER( Core2Lua, mCoreToLua )
    CLASS_EVENT_LISTENER_BASIC( CollisionListener, collision::Events::ObjectPair )

private:
    CLASS_VAR Core2Lua* msInstance;
};

} // namespace glue

#endif // GLUE_CORE2LUA_HH
